<template>
	<div class="tab-bar" v-if="tabData.visible">
		global components (primary_color)!
	</div>
</template>

<script>
import { mapState } from 'vuex';
import store from '../../store';
export default {
	name: 'tabBar',
	components: {
	},
	data() {
		return {
			selected: '/',
			token: null,
			dataArr: [
			]
		};
	},

	computed: {
		...mapState({
			tabData: state => state.global.tabData
		})
	},
	mounted() {
		this.selected = this.$route.path;
	},
	watch: {
		$route(to, from) {
			this.selected = this.$route.path;
		}
	},
	methods: {
		handler(r) {
			if (r === 2) {
				store.dispatch('ctrl_customer', {
					visible: true,
					text: '客服联系方式：'
				});
			}
		}
	}
};
</script>

<style lang="less" scoped>
.tab-bar{
	color: @primary_color
}
</style>